package
{
	import com.junkbyte.console.Cc;

	import flash.display.DisplayObject;
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.display.Shader;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.filesystem.File;
	import flash.net.URLRequest;
	import flash.system.ApplicationDomain;

	[SWF(backgroundColor="#999999", frameRate="999", width="600", height="800")]
	public class as3skeleton extends Sprite
	{
		private var guiSwfLoader:Loader;
		private var guiDomain:ApplicationDomain;

		private var mainSceneMc:MovieClip;
		private var sourceMc:MovieClip;
		private var targetMc:MovieClip;

		private var currentRoation:int=0;

		public function as3skeleton()
		{
			Cc.config.commandLineAllowed=true // Enables full commandLine features
			Cc.config.tracing=true; // also send traces to flash's normal trace()

			Cc.startOnStage(this, "");

			guiSwfLoader=new Loader();
			guiSwfLoader.load(new URLRequest("GUI.swf"));
			guiSwfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadGUIFileComplate);
		}

		private function onLoadGUIFileComplate(e:Event):void
		{
			ResUtils.guiDomain=e.currentTarget.applicationDomain;
			initialize();
		}

		private function initialize():void
		{
			var scene:SkeletionPerformance_0=new SkeletionPerformance_0();
			this.addChild(scene);
			scene.initialize();
		}

	}
}
